|
|
|
|
|
|
|
Okay, now add some existing controls to the control as shown in Figure 11.2. This will give you the tools to create the unique process you need to perform. |
|
|
|
|
|
|
|
|
Figure 11.2.
The initial controls added to the new ActiveX control being created. |
|
|
|
|
|
|
|
|
Don't forget to change the name of the project from UserControl to something a little more meaningful. For this example, name the control AdvDBAdd, referring to this control's function (Advanced Database Add). Also, you should change the control's bitmap image. This image will appear in the toolbox whenever you add the control to an application. Next, you need to activate some properties, methods, and events for the new control. |
|
|
|
|
|
|
|
|
Using the ActiveX Control Interface Wizard |
|
|
|
|
|
|
|
|
The ActiveX control interface wizard is a useful tool that takes some grunt work out of implementing your controls. It helps you support the standard properties, methods, and events in your control. To use the ActiveX control interface, you need to add it to the Add-Ins menu through the Add-Ins Manager, and then select it. The first dialog box that appears is the wizard's information box; you can simple click Next to continue. The wizard then displays a dialog box that lists the custom controls in the project. Select the one you just added and click Next. The next dialog box asks you which of the standard properties will be supported in your control (see Figure 11.3). |
|
|
|
|
|